<?php
    header('Content-Type: text/html; charset=utf8');
    session_start();
    include_once '../../../../controlador/php/conexion/Conexion.php';
    $con = new Conexion();
    
    $listado= "SELECT GENESPECI.OID,GENESPECI.GEEDESCRI FROM ciplantilla
               INNER JOIN ".$con->getReal()."..GENESPECI ON ciplantilla.plespecia = GENESPECI.OID
               ORDER BY GEEDESCRI";

    $res = $con->query($listado);
      
   while($resp = mssql_fetch_array($res)){
        
            $lista[] = array_map(utf8_encode,$resp);
   }
    
    
    $con->cerrarConexion();
     print_r(json_encode($lista))
    
    
 
?>
